<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://xmlns.jcp.org/jsf/html"
	xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
	xmlns:c="http://xmlns.jcp.org/jsf/composite"
	xmlns:p="http://primefaces.org/ui">

<ui:decorate template="/jsp/WEB/pageLayout.xhtml">
	<ui:define name="centro">

		<h:form id="form">

			<p:panel header="Dados Para Busca">

				<p:messages id="messages" showDetail="true" autoUpdate="true"
					closable="true" />

				<h:panelGrid id="gridRel" columns="3"
					style="border:0px;margin-top:1%;">
					<h:outputLabel value="Situação:" />
					<p:selectOneMenu id="Situacao" styleClass="dlgTitulo"
						value="#{RelatorioCardBloqBean.situacao}">
						<f:selectItem itemLabel="Todos" itemValue="todos" />
						<f:selectItem itemLabel="Ativo" itemValue="ativo" />
						<f:selectItem itemLabel="Não ativo" itemValue="inativo" />
						<f:selectItem itemLabel="Bloqueado" itemValue="bloqueado" />
						<f:selectItem itemLabel="Desbloqueado" itemValue="desbloqueado" />
						<f:selectItem itemLabel="Eliminado" itemValue="eliminado" />
					</p:selectOneMenu>

					<p:commandButton id="searchButton" image="ui-icon-search"
						update="@all" ajax="false" title="Consultar Cartão e situação"
						actionListener="#{RelatorioCardBloqBean.fieldsValidation}" />
				</h:panelGrid>

			</p:panel>

			<p:panel id="Listas" header="Listagem de Cartões"
				style="margin-top:3%">
				<p:dataTable id="listaCards" var="cards"
					value="#{RelatorioCardBloqBean.cardList}"
					emptyMessage="Nenhum cartão encontrado!"
					style="margin-top:20px; position: auto" paginator="true"
					filteredValue="#{RelatorioCardBloqBean.cardsFiltrados}">

					<p:column filterBy="#{cards.idCard}}"
						style="width: 50px;text-align:center" sortBy="idCard"
						filterMatchMode="contains">
						<f:facet name="header">Nº de cartão</f:facet>
						<h:outputText value="#{cards.idCard}" />
					</p:column>

					<p:column filterBy="#{cards.numero}"
						style="width: 50px;text-align:center" sortBy="numero"
						filterMatchMode="contains">
						<f:facet name="header">Nº identificação de cartão</f:facet>
						<h:outputText value="#{cards.numero}" />
					</p:column>

					<p:column filterBy="#{cards.situacao}"
						style="width: 50px;text-align:center" sortBy="situacao"
						filterMatchMode="contains">
						<f:facet name="header">Situação</f:facet>
						<h:outputText value="#{cards.situacao}" />
					</p:column>
				</p:dataTable>

			</p:panel>
		</h:form>
	</ui:define>
</ui:decorate>
</html>

